home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 March / EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso / earcd / program / ixemlsrc.lha / ixemul / library / Makefile.in < prev    next >
Makefile  |  1995-12-23  |  6KB  |  222 lines

  1. #### Start of system configuration section. ####
  2.  
  3. srcdir =    @srcdir@
  4.  
  5. ifeq ($(srcdir),.)
  6. srcdir = ../..
  7. endif
  8.  
  9. VPATH :=    $(srcdir)
  10.  
  11. # Common prefix for machine-independent installed files.
  12. prefix =    @prefix@
  13.  
  14. # Common prefix for machine-dependent installed files.
  15. exec_prefix =    @exec_prefix@
  16.  
  17. bindir =    $(exec_prefix)/bin
  18. libdir =    $(exec_prefix)/Sys/libs
  19.  
  20. INSTALL =    @INSTALL@
  21. INSTALL_DATA =    @INSTALL_DATA@
  22.  
  23. CC =        @CC@
  24.  
  25. CFLAGS =    @CFLAGS@
  26. LDFLAGS =    @LDFLAGS@
  27.  
  28. RANLIB =    @RANLIB@
  29. AR =        ar
  30.  
  31. #### End system configuration section ####
  32.  
  33. ifdef CATENATE
  34. DEBUG_FLAG =    -g
  35. else
  36. DEBUG_FLAG =    
  37. endif
  38.  
  39. # I *love* GNU make!
  40. define catenate
  41. /bin/echo -n creating $@...
  42. /bin/echo "$(^:%=#include \"%\"\n)" >$@
  43. /bin/echo done
  44. endef
  45.  
  46. FLAVOR_CFLAGS =    -m$(CPU) -m$(FPU)
  47. ALL_CFLAGS =    $(CFLAGS) $(FLAVOR_CFLAGS) $(OTHER_CFLAGS) $(DEBUG_FLAG) $(INCS) $(DEFS)
  48.  
  49. DEFS =
  50. INCS =        -I$(srcdir) -I$(srcdir)/../library -I$(srcdir)/../include
  51. LIB =        library.a
  52.  
  53. # Strip the executable (-s), don't look for standard libraries (-nostdlib)
  54. # don't link in crt0.o (-nostartfiles) and tell the linker explicitly to
  55. # load the module from the library that defines the symbol "___load_seg"
  56. # (-Xlinker -u -Xlinker ___load_seg).
  57.  
  58. LINKFLAGS =    -nostdlib -nostartfiles -Xlinker -u -Xlinker ___load_seg
  59.  
  60. .SUFFIXES:    .ot
  61.  
  62. .s.o:
  63.         cp $< x.c
  64.         $(CC) $(ALL_CFLAGS) -traditional -E x.c -o x.s
  65.         $(CC) $(ALL_CFLAGS) -c x.s -o $@
  66.         rm -f x.c x.s
  67.  
  68. .s.ot:
  69.         cp $< x.c
  70.         $(CC) $(ALL_CFLAGS) -traditional -DTRACE_LIBRARY -E x.c -o x.s
  71.         $(CC) $(ALL_CFLAGS) -c x.s -o $@
  72.         rm -f x.c x.s
  73.  
  74. .c.o:
  75.         $(CC) $(ALL_CFLAGS) -c $< -o $@
  76.  
  77. all:        ixemul.library ixemul.trace ixemul.debug
  78.  
  79. SRC =        __amiga_filehandle.c __close.c __fioctl.c __fselect.c __fstat.c \
  80.         __init_std_packet.c __ioctl.c __ioerr_to_errno.c __load_seg.c \
  81.         __lock.c __make_link.c __mclose.c __mread.c __must_recompile.c \
  82.         __open.c __plock.c __read.c __swrite.c __tioctl.c __unlock.c \
  83.         __wait_packet.c __write.c _cli_parse.c _wb_parse.c access.c \
  84.         buddy-alloc.c chdir.c chmod.c close.c closedir.c convert_dir.c \
  85.         creat.c createextio.c createport.c createstdio.c createtask.c \
  86.         deleteextio.c deleteport.c deletestdio.c deletetask.c \
  87.         fchdir.c fchmod.c fsync.c ftime.c ftruncate.c get_file.c getcrap.c \
  88.         getpriority.c getrlimit.c gettimeofday.c hwck.c ioctl.c isatty.c \
  89.         ix_close.c ix_expunge.c ix_get_vars2.c ix_init.c ix_open.c \
  90.         ix_panic.c ix_settings.c ix_sigwinch.c ix_sleep.c ix_stubs.c \
  91.         kern_descrip.c kern_sig.c kern_time.c kmalloc.c link.c lseek.c \
  92.         malloc.c mathsup.c mkdir.c open.c opendir.c pipe.c \
  93.         posixconf.c profil.c ptrace.c read.c readdir.c readlink.c readv.c \
  94.         rename.c rewinddir.c rmdir.c seekdir.c select.c setpriority.c \
  95.         setrlimit.c settimeofday.c smallfuncs.c socket.c \
  96.         stat.c statfs.c symlink.c telldir.c truncate.c umask.c unlink.c \
  97.         utime.c utimes.c vfork.c write.c writev.c
  98.  
  99. OBJ =        $(SRC:.c=.o)
  100.  
  101. SRC_A4 =    ix_startup.c _main.c ix_exec_entry.c exit.c ix_resident.c machdep.c
  102. OBJ_A4 =    $(SRC_A4:.c=.o)
  103.  
  104. OBJ_OTHERS =    trap.o ix_timer.o debugstub.o version.o
  105.  
  106. SRC___ =    $(filter _%,$(SRC))
  107. SRC_AH =    $(filter a% b% c% d% e% f% g% h%,$(SRC))
  108. SRC_II =    $(filter i%,$(SRC))
  109. SRC_JO =    $(filter j% k% l% m% n% o%,$(SRC))
  110. SRC_PS =    $(filter p% q% r% s%,$(SRC))
  111. SRC_TZ =    $(filter t% u% v% w% x% y% z%,$(SRC))
  112.  
  113. # These are object files which explicitly get linked into the ixemul.library
  114. # file, in the order specified
  115.  
  116. OBJ_N =        start.o tracecntl.o
  117.  
  118. OBJ_T =        start.ot tracecntl.ot
  119.  
  120. IXLIBS =    $(LIB) \
  121.         ../../../string/$(CPU)/$(FPU)/libstring.a \
  122.         ../../../general/$(CPU)/$(FPU)/libgeneral.a \
  123.         ../../../stdlib/$(CPU)/$(FPU)/libstdlib.a \
  124.         ../../../stdio/$(CPU)/$(FPU)/libstdio.a
  125.  
  126. LIBS =        -lamiga
  127.  
  128. ifdef CATENATE
  129. ALL =        a4.o __.o ah.o ii.o jo.o ps.o tz.o $(OBJ_OTHERS)
  130. else
  131. ALL =        $(OBJ) $(OBJ_A4) $(OBJ_OTHERS)
  132. endif
  133.  
  134. $(LIB) :    $(ALL)
  135.         rm -f $@
  136.         $(AR) rv $@ $(ALL)
  137.         $(RANLIB) $@
  138.  
  139. ixemul.library:    $(OBJ_N) $(IXLIBS)
  140.         $(CC) -s $(LINKFLAGS) $(OBJ_N) $(IXLIBS) $(LIBS) -o $@
  141.  
  142. ixemul.trace:    $(OBJ_T) $(IXLIBS)
  143.         $(CC) -s $(LINKFLAGS) $(OBJ_T) $(IXLIBS) $(LIBS) -o $@
  144.  
  145. ixemul.debug:    $(OBJ_N) $(IXLIBS)
  146.         $(CC) -g $(LINKFLAGS) $(OBJ_N) $(IXLIBS) $(LIBS) -o $@
  147.  
  148. clean:
  149.         rm -rf 680?0
  150.  
  151. clobber:    clean
  152.         rm -f Makefile
  153.  
  154. $(SRC_A4:.c=.o) a4.o:    %.o: %.c
  155.         $(CC) $(ALL_CFLAGS) -ffixed-a4 -c $< -o $@
  156.  
  157. a4.c:        $(SRC_A4)
  158.         @$(catenate)
  159.  
  160. __.c:        $(SRC___)
  161.         @$(catenate)
  162.  
  163. ah.c:        $(SRC_AH)
  164.         @$(catenate)
  165.  
  166. ii.c:        $(SRC_II)
  167.         @$(catenate)
  168.  
  169. jo.c:        $(SRC_JO)
  170.         @$(catenate)
  171.  
  172. ps.c:        $(SRC_PS)
  173.         @$(catenate)
  174.  
  175. tz.c:        $(SRC_TZ)
  176.         @$(catenate)
  177.  
  178. start.o:    start.s $(srcdir)/version.h $(srcdir)/../include/sys/syscall.def ix_internals.h
  179.  
  180. start.ot:    start.s $(srcdir)/version.h $(srcdir)/../include/sys/syscall.def ix_internals.h
  181.  
  182. # this depends on the size of struct user (besides files that need field
  183. # from struct user)
  184.  
  185. ix_open.o:    $(srcdir)/../include/user.h
  186.  
  187. # Force -m68020 & -m68881 so the assembler won't bitch about fpu
  188. # instructions.  This means we have to leave out FLAVOR_CFLAGS.
  189.  
  190. trap.o:        trap.s ix_internals.h
  191.         cp $< x.c
  192.         $(CC) $(CFLAGS) $(OTHER_CFLAGS) $(INCS) -traditional -E x.c -o x.s
  193.         $(CC) $(CFLAGS) $(OTHER_CFLAGS) $(INCS) -c -m68020 -m68881 x.s -o $@
  194.         rm -f x.s x.c
  195.  
  196. ix_timer.o:    ix_timer.c
  197.         $(CC) $(INCS) -O2 -fno-omit-frame-pointer -m68000 -msoft-float -c $< -o $@
  198.  
  199. version.o:    $(srcdir)/version.c
  200.  
  201. tracecntl.o:    tracecntl.c
  202.         $(CC) $(ALL_CFLAGS) -ffixed-a4 -c $< -o $@
  203.  
  204. tracecntl.ot:    tracecntl.c
  205.         $(CC) $(ALL_CFLAGS) -DTRACE_LIBRARY -ffixed-a4 -c $< -o $@
  206.  
  207. ix_internals.h:    create_header
  208.         create_header >$@
  209.  
  210. create_header:    create_header.o
  211.  
  212. create_header.o:    create_header.c $(srcdir)/../include/user.h ixemul.h
  213.  
  214. $(OBJS):    ixemul.h
  215. $(OBJS_N):    ixemul.h
  216. $(OBJS_T):    ixemul.h
  217.  
  218. ix_settings.c vfork.c start.s:    $(srcdir)/version.h
  219.  
  220. $(srcdir)/version.h $(srcdir)/version.c:    parse_version ../version.in
  221.             parse_version $(srcdir)
  222.